Skip to content

Demonstration of CVE-2021-44228 with a possible strategic fix.

Notifications You must be signed in to change notification settings

strawhatasif/log4j-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Example showing CVE-2021-44228 in action

Explanation

  • To reproduce this issue, I am removing the transitive dependency for logging from SpringBoot.
  • Instead, I am bringing in spring-boot-starter-log4j2
  • spring-boot-starter-log4j2 brings in log4j-core which has the remote code exploit (RCE) vulnerability.

Running API

  • Either run the command ./gradlew clean build bootRun in a terminal OR
  • Right click and click run in Log4TestApplication.java.

What happens when you pass in the JNDI value?

  • Because we are resolving to a non-existent site, we get a ConnectException.
  • But, imagine the possibilities if this was an actual malicious server!

img.png

Possible fix?

References:

About

Demonstration of CVE-2021-44228 with a possible strategic fix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages